package com.bibimaya.auto.mapper.dao.mapper.processor;

import com.bibimaya.auto.mapper.dao.mapper.BaseMethodMapper;
import com.bibimaya.auto.mapper.dao.mapper.DeleteMapper;
import com.bibimaya.auto.mapper.dao.utils.DeleteSqlUtil;
import org.apache.ibatis.mapping.ResultMap;
import org.apache.ibatis.mapping.SqlCommandType;

public class DeleteMapperProcessor extends MapperProcessor {

    @Override
    protected Class<? extends BaseMethodMapper> getMapperInterface() {
        return DeleteMapper.class;
    }

    @Override
    protected String sql() {
        return DeleteSqlUtil.deleteSql(getEntityMap(), getWhereIncludeSql());
    }

    @Override
    protected SqlCommandType commandType() {
        return SqlCommandType.DELETE;
    }

    @Override
    protected Class parameterType() {
        return getEntityMap().getC();
    }

    @Override
    protected ResultMap[] resultMaps() {
        return null;
    }
}
